{ "name": "Page Navigator", "script": "PageNavigator.js", "version": "2.11518021707", "previousversions": ["2.1","2.0","1.47","1.46","1.45","1.44","1.42","1.4","1.3","1.031"], "description": "# Page Navigator v2.0\nPage Navigator allows you to more easily move your players from page to page. Movement can be triggered by chat command or token movement. The script will also handle creation of tokens on the new page for moved players.\n## Movement Commands & Token Setup\n### Chat Triggered page change:\nAll players, only those currently in the player ribbon, or specific players can be moved to any page in the game, or returned to the player ribbon.\nThe basic syntax for a move command is:\n`!nav --move,page=PAGENAME,landing=LANDINGTEXT|whole/current/characterid|characterid|characterid|...`\n### Token movement triggered page change:\nUsing this function requires that destination tokens be set up. Whenever a token controlled by a player ends its movement on a destination token, a chat prompt is sent to ask if the character should be moved to the page linked to that destination token or not. The prompt is sent to players only if the destination page is contained in a page folder that players have been given unrestricted access to. See the **Other Options** section below for more information about folders.\nIn order to setup a destination token, the token must be named the same as the page to which it links with the exception of any folder names the page has been tagged with.\n### Token Teleportation:\nWhen moving players to a page, the script can create tokens for each player at a destination token. The default characters to create tokens for for each player can be set in the config menu.\nIn order for teleportation to function, destination tokens (from above) must contain a JSON in their GM notes field of the following format:\n```\n{\n "landingLocation":"Location text of linked token", <=- Optional\n "location":"Location text", <=- Optional\n "chat":"Chat message/API command to send when moving to this destination token", <=- Optional\n "polygon":["Array of polygons limiting token generation"] <=- Only needed if location text is entered\n}\n```\nYou can setup destination tokens by using the Destination Token Setup Wizard via the command `!nav --setup`. You must have a token selected when you enter the command.\n## Miscellaeneous Commands and Other Functions\n* `!nav --config` Brings up the config menu.\n* Folders are designated by tagging pages with whatever folder name you would like enclosed in square brackets (e.g. [FolderName]). Each folder name should be in its own set of square brackets. Any time you reference a page by name for the script, do not incude the folder tags in the name. The script automatically creates two folders, an **All** folder (which pages do not need to be tagged with) and a **Players** folder which can be used to tag pages as with any other folder name. Access restrictions for folders can be set in the config menu. If a page is contained in any folder that has player access, players will be able to send themselves to that page and any destinations therein without GM approval.\n* When teleportation is enabled an additional option will be created in the config menu to automatically remove other tokens for teleporting players before creating new tokens for them.\n## Example Use Cases\nAssuming pages named Scrapwall [Numeria][Scrapwall] with locations of "Clockwork Chapel"(LinkLocation:entrance) and "Raider Hideout"(LinkLocation:entrance), Clockwork Chapel[Numeria][Scrapwall] with a location of "entrance"(linkLocation:"Clockwork Chapel"), and Raider Hideout with a location of "entrance"(linkLocation:"Raider Hideout"). And characters named Jonos,Kindle, and Violet.\n* Move player(s) controlling Jonos to Raider Hideout:\n`!nav --move,page=Raider Hideout|@{Jonos|character_id}`\n* Move as before and create default token(s) for the player(s):\n`!nav --move,page=Raider Hideout,landing=entrance|@{Jonos|character_id}`\n* Return Jonos to the player ribbon:\n`!nav --move,page=return|@{Jonos|character_id}`\n* Return as before, but query where to generate a token:\n`!nav --move,page=return,landing=?|@{Jonos|character_id}`\n## Full Command Syntax Guide\nThis is the full guide of the chat commands available. Syntax is given with optional arguments enclosed in square brackets (e.g. Required Argument vs. [Optional Argument]). Mutually exclusive arguments are separated by a forward slash (/), do not include these brackets when sending actual commands to the script.\n* Move Command:\n`!nav --move,[page=PAGENAME/pageID=pageid],[landing=LOCATIONTEXT/?]|[PLAYERNAME/PLAYERID/CHARACTERID]|[PLAYERNAME/PLAYERID/CHARACTERID]|...`\n * **page=PAGENAME:** The page name, without the folder tags, of the page to move to. If the command is sent by a player, itwill be ignored if the page is not contained within a player accessible folder.\n * **pageID=PAGEID:** The page id of the page to move to. This will probably only be used by the script itself or other APIs as there is no way for users to access the page id.\n * **landing=LOCATIONTEXT:** This is the location text of the token where tokens should be created. If a **?** is entered as the location text, a menu prompt will be sent to the messaging player to ask what destination to use.\n * **PLAYERNAME/PLAYERID/CHARACTERID:** The player name, player ID, or character ID to be moved.\n * If no page is specified a prompt will be sent to the messaging player to ask what page to send players to.\n * If no player or character is specified the command will not be processed.\n* Configuration Option Controls:\n`!nav --config,[remove=on/off],[teleport=on/off],[folder=FOLDERNAME,access=gm/players],[control=whole/current/self],[dmarker=statusmarker name/name only]`\n * If no additional options are entered, then the config menu will be displayed. Will only use the first of these the script encounters.\nremove: This sets token removal on or off. Token removal causes all other instances of tokens representing teleporting characters to be removed before creating new tokens at a designated destination token.\n * **folder:** Designates what folder that you would like to change the access state of. Folder access information is stored in the Page Navigator character in an ability called Page Folders.\n * **access:** This sets player access for the indicated folder.\n * **control:** Sets player's ability to move others to new pages (whole=all players, current party=only those currently on the player toolbar, self=only themselves).\n * **dmarker:** Sets what status marker is used to define destination tokens. Can be the name of a statusmarker or **name**. If **name** will only look for tokens that are named the same as a page.\n * **teleport:** Sets token teleportation on/off.\n* Destination Token Setup Wizard:\n`!nav --setup`\n**Wizard Buttons:**\n * **Token Name:** Clicking this button will bring up a query with options for the names of all current pages. You can also enter the name of yet to be created name by selecting the **PAGE NOT CREATED YET** option\n * **Boundary:** Select polygonal paths that you want to use to bound the token creation area for the destination token and then click this button. All polygons selected should create a closed shape as the script determines whether tokens can be created from a destination via a flood-fill algorithm.\n * **Location Text:** Clicking this button will bring up a query similar to that of the Token Name for selecting or entering custom text to describe the location of this destination.\n * **linkLocation Text:** As the button for Location text, but describes the location of the destination token this token links to.\n * **Chat Command:** Allows you to enter a line of text to be sent to chat when players are moved to this destination. Can be used to have the script send API commands based on party movement.", "authors": "Scott C.", "roll20userid": "459831", "useroptions": [], "dependencies": ["Token Collisions","Path Math","Vector Math","Matrix Math"], "modifies": { "Campaign.playerpageid": "read,write", "Campaign.playerspecificpages": "read,write", "state.PAGENAVIGATOR.version": "read,write", "token.statusmarker": "read", "token.gmnotes":"read", "character.defaulttoken":"read" }, "conflicts": [] }